﻿// This file is part of the WinFormium project.
// Copyright (c) 2025 Xuanchen Lin all rights reserved.
// This project is licensed under the LGPL License.
// See the LICENSE file in the project root for more information.

namespace WinFormium;

partial class WebViewCore : IFocusHandler
{
    /// <inheritdoc/>
    void IFocusHandler.OnGotFocus(CefBrowser browser)
    {
        BrowserClient?.FocusHandler?.OnGotFocus(browser);
    }

    /// <inheritdoc/>
    bool IFocusHandler.OnSetFocus(CefBrowser browser, CefFocusSource source)
    {
        return BrowserClient?.FocusHandler?.OnSetFocus(browser, source) ?? false;
    }

    /// <inheritdoc/>
    void IFocusHandler.OnTakeFocus(CefBrowser browser, bool next)
    {
        BrowserClient?.FocusHandler?.OnTakeFocus(browser, next);
    }
}
